﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace JKF.Substructure.Form
{
    public static class Html
    {
        private const string _checkbox = "<input type=\"checkbox\" value=\"{0}\" {1} >";

        public static string CheckBox(object val)
        {
            return string.Format(_checkbox, val);
        }

        public static string CheckBox(object val, object isChecked)
        {
            var ischk = Convert.ToBoolean(isChecked);
            return string.Format(_checkbox, val, ischk ? "checked=\"checked\"" : string.Empty);
        }

    }
}
